<?php
set_time_limit(0);
if (isset($_POST['uid']) && isset($_POST['n'])){
    include '../c/config.php';
    //$openid=trim($_POST['op']);
    $uid=$_POST['uid'];
    $name=addslashes(trim($_POST['n']));
    $idcard=addslashes(trim($_POST['idc']));
    $phone=addslashes(trim($_POST['ph']));
    $zu=$_POST['zu'];
    $school=$_POST['school'];
    $school2=addslashes(trim($_POST['school2']));
     
    $mysqli = new mysqli($dbhost, $dbuser, $dbpwd, $dbName);
    if (!$mysqli->set_charset("utf8")) {printf("Error loading character set utf8: %s\n", $mysqli->error);}
       
    $mysqli->query("INSERT INTO `uinfo` (`id`, `uid`, `name`,`phone`,`idcard`,`zu`,`school`,`school2`,`createtime`) VALUES (NULL,'".$uid."', '".$name."','".$phone."','".$idcard."','".$zu."','".$school."','".$school2."', '".date("Y-m-d H:i:s")."')");
    $mysqli->close();
    echo json_encode(array('s'=>'y'));
}else{
    echo json_encode(array('s'=>'n'));
}

?>